#include <QtPlugin>
#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QDoubleSpinBox>
#include <QSpinBox>
#include <QComboBox>
#include <QMessageBox>
#include <QCheckBox>
#include <QFile>
#include <QTextStream>
#include <QFileDialog>

#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv2/gpu/gpu.hpp>

#include "QCVModuleInterface.h"
#include "QCVModuleHandlerInterface.h"

#ifndef MODULE_SURF
#define MODULE_SURF

/**
@class ModuleGPUSURF
@brief Module de detection d'invarents d'echelle et|ou extraction de descripteurs
*/
class ModuleGPUSURF:public QObject,QCVModuleInterface
{
  Q_OBJECT
	Q_INTERFACES(QCVModuleInterface)
	
	public:
	 void init(QCVModuleHandlerInterface * parent);
   void free();
   
   cv::Mat & process();
   void setInput(int n,const cv::Mat & m);

   QWidget* widget();
   QString getName();
   int nbInputs();
	 QString getParams();
   bool setParams(QString params);
   QString help(int id);

	 QCVModuleInterface * clone();

  private slots:
    
  private:  
    
		QDoubleSpinBox *sb_hessianThreshold,*sb_keypointsRatio;
		QSpinBox *sb_nOctaves,*sb_nOctaveLayers;
		QCheckBox *cb_extended;		

		QWidget * win;
    QVBoxLayout * layout;
		
		cv::Mat img;
		cv::Mat_<float> surfKeys;
		std::vector<cv::KeyPoint> surfKeys_vec;
    

    QCVModuleHandlerInterface * parent;
};

#endif
